All Questions
Tagged with mongodbruby-on-rails
5 questions
3votes
2answers
76views
Persist relation to a class (and not a class instance) in Ruby on Rails with Mongoid
Assume my users can subscribe to several plan_types. I want to define those plans as classes, and be able to keep, for each user, a reference to a subscription_plan and also a presubscription_plan. ...
0votes
1answer
124views
List User Online Status
I'm using Rails with MongoDB for database. In my apps I have 1 action for displaying list of users. User has name, image, ...
2votes
0answers
483views
Scoping through embedded document in MongoId
I'm using MongoId in a Rails project. I need to select some products which contain some SKUs which has an embedded document. The models are respectively Product and ...
1vote
2answers
2kviews
Finding mongodb records in batches using mongoid [closed]
I want to get records in batches. But mongoid doc says to avoid using skip due as it can be expensive. I wrote this method to iterate through a large number records efficiently. ...
3votes
1answer
75views
Probability ordering by seller's tariff
I have an instance method which calculates the position of an element, depending on the tariff of its seller. If the seller is of a level3 tariff, it gets to top ...